let t = require;
let e = module;
let o = e.exports;
o.default = e.exports;

('use strict');
console.log('start');
var _n66,
  i =
    (this && this.__extends) ||
    ((_n66 = function n(t, e) {
      return (_n66 =
        Object.setPrototypeOf ||
        ({
          __proto__: []
        } instanceof Array &&
          function (t, e) {
            t.__proto__ = e;
          }) ||
        function (t, e) {
          for (var o in e) {
            Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]);
          }
        })(t, e);
    }),
    function (t, e) {
      function o() {
        this.constructor = t;
      }
      _n66(t, e),
        (t.prototype =
          null === e
            ? Object.create(e)
            : ((o.prototype = e.prototype), new o()));
    });
Object.defineProperty(o, '__esModule', {
  value: !0
}),
  (o.CardType3Com = void 0);
var r = t('UIComponent'),
  a = t('ComUtils'),
  s = t('ResMrg'),
  c = t('SoundMrg'),
  l = t('UIMrg'),
  u = t('CardUpgradePanel'),
  h = t('LangCfg'),
  p = (function (t) {
    function e(e, o) {
      var n = t.call(this, e) || this;
      return (n.info = o), n;
    }
    return (
      i(e, t),
      (e.prototype.onInit = function () {
        (this._imgFrame = a.default.getComponent(
          cc.Sprite,
          this.view,
          'imgCard'
        )),
          (this._imgIcon = a.default.getComponent(
            cc.Sprite,
            this.view,
            'imgCard/imgIcon'
          )),
          (this._imgQuality = a.default.getComponent(
            cc.Sprite,
            this.view,
            'imgCard/imgQuality'
          )),
          (this._txtName = a.default.getComponent(
            cc.Label,
            this.view,
            'imgCard/txtName'
          ));
      }),
      (e.prototype.onLang = function () {
        (a.default.getComponent(
          cc.Label,
          this.view,
          'imgCard/txtWeiHuoDe'
        ).string = h.LangCfg.ins.getContent(200702)),
          this._info &&
            (this._txtName.string = h.LangCfg.ins.getContent(this._info.name));
      }),
      (e.prototype.onTouchEvenHandler = function (t) {
        t.type == cc.Node.EventType.TOUCH_END &&
          (c.SoundMrg.click(), l.UIMrg.show(u.CardUpgradePanel, this.info));
      }),
      Object.defineProperty(e.prototype, 'info', {
        get: function get() {
          return this._info;
        },
        set: function set(t) {
          this._info != t && ((this._info = t), t && this.refreshCard());
        },
        enumerable: !1,
        configurable: !0
      }),
      (e.prototype.refreshCard = function () {
        s.ResMrg.loadSpriteByAtlas(
          this._imgFrame,
          'Atlas/Card',
          'frame' + this._info.quality
        ),
          s.ResMrg.loadSpriteByAtlas(
            this._imgIcon,
            'Atlas/Card',
            this._info.icon
          ),
          s.ResMrg.loadSpriteByAtlas(
            this._imgQuality,
            'Atlas/Card',
            'quality' + this._info.quality
          ),
          this.onLang();
      }),
      e
    );
  })(r.UIComponent);
(o.CardType3Com = p), console.log('end');
module.exports = e.exports;
